﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NewsList.ascx.cs" Inherits="BackEnd_News" %>
<%@ Register src="NewsModify.ascx" tagname="NewsModify" tagprefix="uc1" %>
<table id="Table2" cellspacing="1" cellpadding="1">
    <tr>
        <td class="toolbarchungall" align="left">
        <b>
            <%=_urlChung %>
        </b>
        </td>
    </tr>
    <tr>
        <td class="toolbar" align="right">          
            <div class="pannelCT">
                Ẩn hiện phần thêm
            </div>
            <div class="contentCT">
                <uc1:NewsModify ID="NewsModify1" runat="server" />
                <%--<asp:Panel ID="addNew"  runat="server">
                    <uc1:NewsModify ID="NewsModify1" runat="server" />
                </asp:Panel>--%>
            </div>
        </td>
    </tr>
    
    <tr style="text-align: left">
        <td align="center" colspan="4" style="width: 908px">
            <asp:Label ID="labMessage" runat="server" Width="100%" ForeColor="Red" Font-Bold="True"></asp:Label>
        </td>
    </tr>
    <tr>
        <td align="left">
            <asp:GridView runat="server" ID="grid" BorderColor="#CC9966" BorderStyle="None"
                BorderWidth="1px" RowStyle-BorderWidth="0" RowStyle-BorderStyle="None" Width="100%"
                AlternatingRowStyle-BackColor="#f8f8f8" AlternatingRowStyle-BorderColor="#f8f8f8"
                HeaderStyle-BackColor="#F1F1F1" CellPadding="4" 
                AutoGenerateColumns="False" AutoGenerateDeleteButton="True"
                AutoGenerateEditButton="True" OnRowEditing="grid_RowEditing" OnRowDeleting="grid_RowDeleting"
                OnRowUpdating="grid_RowUpdating" AllowSorting="True" BackColor="White" ShowFooter="True"
                AllowPaging="True" OnPageIndexChanging="grid_PageIndexChanging" 
                PageSize="20">
                
                <Columns>
                    <asp:TemplateField HeaderText="Tên">
                        <ItemTemplate>
                           <asp:LinkButton ID="lbtTitile" runat="server" CommandName="lbtUpdate" Text='<%#Eval(Component.ColumNews._Titile)%>' 
                           CommandArgument="<%#Eval(Component.ColumNews._Id) %>">
                            </asp:LinkButton>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox runat="server" ID="txtTitile" Text='<%#Eval(Component.ColumNews._Titile)%>' />
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    
                   <asp:TemplateField HeaderText="Tóm Tắt" ItemStyle-Width="600px">
                        <ItemTemplate>
                            <%#Eval(Component.ColumNews._Summary)%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox runat="server" ID="txtSummary" Width="600px" TextMode="MultiLine" Text="<%#Eval(Component.ColumNews._Summary)%>" />
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtiu" runat="server" CommandName="lbtNewSub" Text="Cập nhật Dữ Liệu"
                                CommandArgument="<%#Eval(Component.ColumNews._Id) %>">
                            </asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                </Columns>
                <RowStyle BorderStyle="None" BorderWidth="0px" />
                <HeaderStyle BackColor="#F1F1F1" />
                <AlternatingRowStyle BackColor="#F8F8F8" BorderColor="#F8F8F8" />
            </asp:GridView>
        </td>
    </tr>
</table>